unit LookupClientF;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, LookupF, FMTBcd, SqlExpr, Provider, DB, DBClient, Grids, DBGrids,
  SQLDataSetA, StrUtils;

type
  TLookupClientFrame = class(TLookupFrame)
    procedure DsFilterRecord(DataSet: TDataSet; var Accept: Boolean);
  private
    { Private declarations }
  protected
  public
    constructor Create(AOwner: TComponent; NotifySelection: TNotifyEvent); override;
  end;


implementation
uses
  ClientsF;

{$R *.dfm}

{ TLookupClientFrame }

{ TLookupClientFrame }

constructor TLookupClientFrame.Create(AOwner: TComponent;
  NotifySelection: TNotifyEvent);
begin
  inherited;
  Ds.CloneCursor(ClientsFrame.Ds, True);
  Ds.OnFilterRecord := DsFilterRecord; // peab uuesti omistama
end;

procedure TLookupClientFrame.DsFilterRecord(DataSet: TDataSet;
  var Accept: Boolean);
begin
  Accept := ContainsText(DataSet.FieldByName('NIMI').AsString, SearchString);
end;

end.
